home *** CD-ROM | disk | FTP | other *** search
- Path: pacer1.usca.sc.edu!dwb
- From: dwb@I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN (David Botsch)
- Newsgroups: comp.lang.c++
- Subject: Sound & C++
- Date: 21 Feb 1996 23:02:45 GMT
- Organization: University of South Carolina - Columbia - Computer Science
- Message-ID: <4gg8al$h5v@redwood.cs.sc.edu>
- NNTP-Posting-Host: pacer1.usca.sc.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- I would like to be able to program my sound card
- in C++. I have done this so far with
- fopen and fwrite to /dev/audio1.
- I am attempting to create a sine wave, so that
- I can modify the frequency and amplitude of the
- wave to modify the volume and pitch of the sound.
- The algorithm creating a sine wave works fine.
- However, if I fwrite the constantly changing
- values to my sound card, I am greeted with noise.
- fwriting a constant value to /dev/audio1 produces
- the same tone, no matter the value. It would appeear
- that the sound card somehow creates its own sin wave
- using my method.
- So the question is, how do I, in C++, send data to the
- sound card? As I mentioned, I would like to be able
- to create a sine wave, so I can then modify the quality
- by dividing by 44 or 127, etc.
- A private e-mail response is preferred so that I don't
- have to search through the newsgroup for a response.
- Thanks for all assistance!
- Respond to: dwb@pacer1.usca.sc.edu
- -David Botsch
-
-